home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / doc / gui_x11.txt < prev    next >
Encoding:
Text File  |  2001-09-26  |  21.9 KB  |  513 lines

  1. *gui_x11.txt*   For Vim version 6.0.  Last change: 2001 Sep 07
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Bram Moolenaar
  5.  
  6.  
  7. Vim's Graphical User Interface                *gui-x11* *GUI-X11*
  8.                             *Athena* *Motif*
  9. 1. Starting the X11 GUI        |gui-x11-start|
  10. 2. GUI Resources        |gui-resources|
  11. 3. Shell Commands        |gui-pty|
  12. 4. Various            |gui-x11-various|
  13. 5. GTK version            |gui-gtk|
  14. 6. GNOME version        |gui-gnome|
  15. 7. Compiling            |gui-x11-compiling|
  16. 8. X11 selection mechanism    |x11-selection|
  17.  
  18. Other relevant documentation:
  19. |gui.txt|    For generic items of the GUI.
  20.  
  21. {Vi does not have any of these commands}
  22.  
  23. ==============================================================================
  24. 1. Starting the X11 GUI                    *gui-x11-start*
  25.  
  26. Then you can run the GUI version of Vim in either of these ways:
  27.     gvim [options] [files...]
  28.     vim -g [options] [files...]
  29.  
  30. So if you call the executable "gvim", or make "gvim" a link to the executable,
  31. then the GUI version will automatically be used.  Additional characters may be
  32. added after "gvim", for example "gvim-5".
  33.  
  34. You may also start up the GUI from within the terminal version by using one of
  35. these commands:
  36.     :gui [++opt] [+cmd] [-f|-b] [files...]            *:gu* *:gui*
  37.     :gvim [++opt] [+cmd] [-f|-b] [files...]            *:gv* *:gvim*
  38. The "-f" option runs Vim in the foreground.
  39. The "-b" option runs Vim in the background (this is the default).
  40. Also see |++opt| and |+cmd|.
  41.  
  42.                             *gui-fork*
  43. When the GUI is started, it does a fork() and exits the current process.
  44. When gvim was started from a shell this makes the shell accept further
  45. commands.  If you don't want this (e.g. when using gvim for a mail program
  46. that waits for gvim to exit), start gvim with "gvim -f", "vim -gf" or use
  47. ":gui -f".  Don't use "vim -fg", because "-fg" specifies the foreground
  48. color.
  49.  
  50. When using "gvim -f" and then ":gui", Vim will run in the foreground.  The
  51. "-f" argument will be remembered.  To force running Vim in the background use
  52. ":gui -b".
  53.  
  54. If you want the GUI to run in the foreground always, include the 'f'
  55. flag in 'guioptions'.  |-f|.
  56.  
  57. ==============================================================================
  58. 2. GUI Resources            *gui-resources* *.Xdefaults*
  59.  
  60. If using the Motif or Athena version of the GUI (not for the GTK+ or Win32
  61. version), a number of X resources are available.  You should use Vim's class
  62. "Vim" when setting these.  They are as follows:
  63.  
  64.     Resource name    Meaning        ~
  65.  
  66.     reverseVideo    Boolean: should reverse video be used?
  67.     background        Color of background.
  68.     foreground        Color of normal text.
  69.     scrollBackground    Color of trough portion of scrollbars.
  70.     scrollForeground    Color of slider and arrow portions of scrollbars.
  71.     menuBackground    Color of menu backgrounds.
  72.     menuForeground    Color of menu foregrounds.
  73.     tooltipForeground    Color of tooltip and balloon foreground.
  74.     tooltipBackground    Color of tooltip and balloon background.
  75.  
  76.     font        Name of font used for normal text.
  77.     boldFont        Name of font used for bold text.
  78.     italicFont        Name of font used for italic text.
  79.     boldItalicFont    Name of font used for bold, italic text.
  80.     menuFont        Name of font used for the menus, used when compiled
  81.             without the |+xfontset| feature
  82.     menuFontSet        Name of fontset used for the menus, used when compiled
  83.             with the |+xfontset| feature
  84.     tooltipFont        Name of the font used for the tooltip and balloons.
  85.             When compiled with the |+xfontset| feature this is a
  86.             fontset name.
  87.  
  88.     geometry        Initial geometry to use for gvim's window (default
  89.             is same size as terminal that started it).
  90.     scrollbarWidth    Thickness of scrollbars.
  91.     borderWidth        Thickness of border around text area.
  92.     menuHeight        Height of the menu bar (only for Athena).
  93.  
  94. A special font for italic, bold, and italic-bold text will only be used if
  95. the user has specified one via a resource.  No attempt is made to guess what
  96. fonts should be used for these based on the normal text font at the moment.
  97.  
  98. Note that the colors can also be set with the ":highlight" command, using the
  99. "Normal", "Menu", "Tooltip", and "Scrollbar" groups.  Example: >
  100.     :highlight Menu guibg=lightblue
  101.     :highlight Tooltip guibg=yellow
  102.     :highlight Scrollbar guibg=lightblue guifg=blue
  103.     :highlight Normal guibg=grey90
  104. <
  105.                             *font-sizes*
  106. Note: All fonts (except for the menu and tooltip) must be of the same size!!!
  107. If you don't do this, text will disappear or mess up the display.  Vim does
  108. not check the font sizes.  It's the size in screen pixels that must be the
  109. same.  Note that some fonts that have the same point size don't have the same
  110. pixel size!  Additionally, the positioning of the fonts must be the same
  111. (ascent and descent).  You can check this with "xlsfonts -l {fontname}".
  112.  
  113. If any of these things are also set with Vim commands, eg with
  114. ":set guifont=Screen15", then this will override the X resources (currently
  115. 'guifont' is the only option that is supported).
  116.  
  117. Here is an example of what you might put in your ~/.Xdefaults file: >
  118.  
  119.     Vim*useSchemes:            all
  120.     Vim*sgiMode:            true
  121.     Vim*useEnhancedFSB:        true
  122.     Vim.foreground:            Black
  123.     Vim.background:            Wheat
  124.     Vim*fontList:            7x13
  125.  
  126. The first three of these are standard resources on Silicon Graphics machines
  127. which make Motif applications look even better, highly recommended!
  128.  
  129. The "Vim*fontList" is to set the menu font for Motif.  Example: >
  130.     Vim*menuBar*fontList:         -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
  131. With Athena: >
  132.     Vim*menuBar*SmeBSB*font:     -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
  133.     Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
  134.  
  135. NOTE: A more portable, and indeed more correct, way to specify the menu font
  136. in either Motif or Athena is through the resource: >
  137.     Vim.menuFont:         -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
  138. Or, when compiled with the |+xfontset| feature: >
  139.     Vim.menuFontSet:     -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
  140.  
  141. Don't use "Vim*geometry" in the defaults.  This will break the menus.  Use
  142. "Vim.geometry" instead.
  143.  
  144. If you get an error message "Cannot allocate colormap entry for "gray60",
  145. try adding this to your Vim resources (change the colors to your liking): >
  146.  
  147.     Vim*scrollBackground:        Black
  148.     Vim*scrollForeground:        Blue
  149.  
  150. The resources can also be set with arguments to vim:
  151.  
  152.     argument        meaning    ~
  153.                             *-gui*
  154.    -display {display}    Run vim on {display}        *-display*
  155.    -iconic        Start vim iconified        *-iconic*
  156.    -background {color}    Use {color} for the background    *-background*
  157.    -bg {color}        idem                *-bg*
  158.    -foreground {color}    Use {color} for normal text    *-foreground*
  159.    -fg {color}        idem                *-fg*
  160.    -ul {color}        idem                *-ul*
  161.    -font {font}        Use {font} for normal text    *-font*
  162.    -fn {font}        idem                *-fn*
  163.    -boldfont {font}    Use {font} for bold text    *-boldfont*
  164.    -italicfont {font}    Use {font} for italic text    *-italicfont*
  165.    -menufont {font}    Use {font} for menu items    *-menufont*
  166.    -menufontset {fontset} Use {fontset} for menu items    *-menufontset*
  167.    -mf {font}        idem                *-mf*
  168.    -geometry {geom}    Use {geom} for initial geometry    *-geometry*
  169.    -geom {geom}        idem                *-geom*
  170.    -borderwidth {width}    Use a border width of {width}    *-borderwidth*
  171.    -bw {width}        idem                *-bw*
  172.                             *-scrollbarwidth*
  173.    -scrollbarwidth {width}    Use a scrollbar width of {width}
  174.    -sw {width}        idem                *-sw*
  175.    -menuheight {height}    Use a menu bar height of {height} *-menuheight*
  176.    -mh {height}        idem                *-mh*
  177.             NOTE: On Motif the value is ignored, the menu height
  178.             is computed to fit the menus.
  179.    -reverse        Use reverse video        *-reverse*
  180.    -rv            idem                *-rv*
  181.    +reverse        Don't use reverse video        *-+reverse*
  182.    +rv            idem                *-+rv*
  183.    -xrm {resource}    Set the specified resource    *-xrm*
  184.  
  185. Note about reverse video: Vim checks that the result is actually a light text
  186. on a dark background.  The reason is that some X11 versions swap the colors,
  187. and some don't.  These two examples will both give yellow text on a blue
  188. background:
  189.     gvim -fg Yellow -bg Blue -reverse
  190.     gvim -bg Yellow -fg Blue -reverse
  191.  
  192. ==============================================================================
  193. 3. Shell Commands                    *gui-pty*
  194.  
  195. WARNING: Executing an external command from the GUI will not always work.
  196. "normal" commands like "ls", "grep" and "make" mostly work fine.  Commands
  197. that require an intelligent terminal like "less" and "ispell" won't work.
  198. Some may even hang and need to be killed from another terminal.  So be
  199. careful!
  200.  
  201. There are two ways to do the I/O with a shell command: Pipes and a pseudo-tty.
  202. The default is to use a pseudo-tty.  This should work best on most systems.
  203.  
  204. Unfortunately, the implementation of the pseudo-tty is different on every Unix
  205. system.  And some systems require root permission.  To avoid running into
  206. problems with a pseudo-tty when you least expect it, test it when not editing
  207. a file.  Be prepared to "kill" the started command or Vim.  Commands like
  208. ":r !cat" may hang!
  209.  
  210. If using a pseudo-tty does not work for you, reset the 'guipty' option: >
  211.  
  212.     :set noguipty
  213.  
  214. Using a pipe should work on any Unix system, but there are disadvantages:
  215. - Some shell commands will notice that a pipe is being used and behave
  216.   differently.  E.g., ":!ls" will list the files in one column.
  217. - The ":sh" command won't show a prompt, although it will sort of work.
  218. - When using ":make" it's not possible to interrupt with a CTRL-C.
  219.  
  220. Typeahead while the external command is running is often lost.  This happens
  221. both with a pipe and a pseudo-tty.  This is a known problem, but it seems it
  222. can't be fixed (or at least, it's very difficult).
  223.  
  224.                             *gui-pty-erase*
  225. When your erase character is wrong for an external command, you should fix
  226. this in your "~/.cshrc" file, or whatever file your shell uses for
  227. initializations.  For example, when you want to use backspace to delete
  228. characters, but hitting backspaces produces "^H" instead, try adding this to
  229. your "~/.cshrc": >
  230.     stty erase ^H
  231. The ^H is a real CTRL-H, type it as CTRL-V CTRL-H.
  232.  
  233. ==============================================================================
  234. 4. Various                        *gui-x11-various*
  235.  
  236.                             *gui-x11-printing*
  237. The "File/Print" menu simply sends the current buffer to "lpr".  No options or
  238. whatever.  If you want something else, you can define your own print command.
  239. For example: >
  240.  
  241.   :10amenu File.Print :w !lpr -Php3
  242.   :10vmenu File.Print :w !lpr -Php3
  243. <
  244.                             *X11-icon*
  245. Vim uses a black&white icon by default when compiled with Motif or Athena.  A
  246. colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm.  For GTK+, this is
  247. the builtin icon used.  Unfortunately, how you should install it depends on
  248. your window manager.  When you use this, remove the 'i' flag from
  249. 'guioptions', to remove the black&white icon: >
  250.   :set guioptions-=i
  251.  
  252. If you use one of the fvwm* family of window managers simply add this line to
  253. your .fvwm2rc configuration file: >
  254.  
  255.   Style "vim"        Icon vim32x32.xpm
  256.  
  257. Make sure the icon file's location is consistent with the window manager's
  258. IconPath statement.  Either modify the IconPath from within your .fvwm2rc or
  259. drop the icon into one the pre-defined directories:
  260.  
  261.   IconPath /usr/X11R6/include/X11/pixmaps:/usr/X11R6/include/X11/bitmaps >
  262.  
  263. For CDE "dtwm" (a derivative of Motif) add this line in the .Xdefaults: >
  264.    Dtwm*Vim*iconImage: /usr/local/share/vim/vim32x32.xpm
  265.  
  266. For "mwm" (Motif window manager) the line would be: >
  267.    Mwm*Vim*iconImage: /usr/local/share/vim/vim32x32.xpm
  268.  
  269. Mouse Pointers Available in X11                *X11_mouse_shapes*
  270.  
  271. By using the |'mouseshape'| option, the mouse pointer can be automatically
  272. changed whenever vim enters one of its various modes (e.g., Insert or
  273. Command).  Currently, the available pointers are:
  274.  
  275.     arrow            an arrow pointing northwest
  276.     beam            a I-like vertical bar
  277.     size            an arrow pointing up and down
  278.     busy            a wristwatch
  279.     blank            an invisible pointer
  280.     crosshair        a thin "+" sign
  281.     hand1            a dark hand pointing northeast
  282.     hand2            a light hand pointing northwest
  283.     pencil            a pencil pointing southeast
  284.     question        question_arrow
  285.     right_arrow        an arrow pointing northeast
  286.     up_arrow        an arrow pointing upwards
  287.  
  288. Additionally, any of the mouse pointers that are built into X11 may be
  289. used by specifying an integer from the X11/cursorfont.h include file.
  290.  
  291. If a name is used that exists on other systems, but not in X11, the default
  292. "arrow" pointer is used.
  293.  
  294. ==============================================================================
  295. 5. GTK version                        *gui-gtk* *GTK+* *GTK*
  296.  
  297. The GTK version of the GUI works a little bit different.
  298.  
  299. GTK does _not_ use the traditional X resource settings.  Thus items in your
  300. ~/.Xdefaults or app-defaults files are not used.
  301. Many of the traditional X command line arguments are not supported.  (e.g.,
  302. stuff like -bg, -fg, etc).  The ones that are supported are:
  303.  
  304.     command line argument   resource name    meaning ~
  305.     -fn  or  -font        .font        font name for the text
  306.     -geom  or  -geometry    .geometry        size of the gvim window
  307.     -rv  or  -reverse        *reverseVideo    white text on black background
  308.     -display                    display to be used
  309.  
  310. To set the font, see |'guifont'|.  For GTK, there's also a menu option that
  311. does this.
  312.  
  313. Additionally, there are these command line arguments, which are handled by GTK
  314. internally.  Look in the GTK documentation for how they are used:
  315.     --sync
  316.     --gdk-debug
  317.     --gdk-no-debug
  318.     --no-xshm
  319.     --xim-preedit
  320.     --xim-status
  321.     --gtk-debug
  322.     --gtk-no-debug
  323.     --g-fatal-warnings
  324.     --gtk-module
  325.     --display    (GTK+ counterpart of -display; works the same way.)
  326.  
  327. As for colors, vim's color settings (for syntax highlighting) is still
  328. done the traditional vim way.  See |:highlight| for more help.
  329.  
  330. If you want to set the colors of remaining gui components (e.g., the
  331. menubar, scrollbar, whatever), those are GTK specific settings and you
  332. need to set those up in some sort of gtkrc file.  you'll have to refer
  333. to the GTK documentation, however little there is, on how to do this.
  334.  
  335.                         *gtk-tooltip-colors*
  336. Example, which sets the tooltip colors to black on light-yellow: >
  337.  
  338.     style "tooltips"
  339.     {
  340.         bg[NORMAL] = "#ffffcc"
  341.         fg[NORMAL] = "#000000"
  342.     }
  343.  
  344.     widget "gtk-tooltips*"        style "tooltips"
  345.  
  346. Write this in the file ~/.gtkrc and it will be used by GTK.  Don't forget to
  347. remove the ">" characters from the first column.
  348.  
  349.  
  350. Using Vim as a GTK+ plugin                *gui-gtk-socketid*
  351.  
  352. When the GTK+ version of Vim starts up normally, it creates its own top level
  353. window (technically, a 'GtkWindow').  GTK+ provides an embedding facility with
  354. its GtkSocket and GtkPlug widgets.  If one GTK+ application creates a
  355. GtkSocket widget in one of its windows, an entirely different GTK+ application
  356. may embed itself into the first application by creating a top-level GtkPlug
  357. widget using the socket's ID.
  358.  
  359. If you pass Vim the command-line option '--socketid' with a decimal or
  360. hexadecimal value, Vim will create a GtkPlug widget using that value instead
  361. of the normal GtkWindow.  This enables Vim to act as a GTK+ plugin.
  362.  
  363. This really is a programmer's interface, and is of no use without a supporting
  364. application to spawn the Vim correctly.  For more details on GTK+ sockets, see
  365. http://www.gtk.org/api/
  366.  
  367. Note that this feature requires the latest GTK version.  GTK 1.2.10 still has
  368. a small problem.
  369.  
  370. ==============================================================================
  371. 6. GNOME version                *gui-gnome* *Gnome* *GNOME*
  372.  
  373. The Gnome GUI works just like the GTK version.  It only looks a bit different.
  374. See |GTK| above for how it works.
  375.  
  376. These are the different looks:
  377. - Uses GNOME dialogs.
  378. - Uses the GNOME dock, so that the toolbar and menubar can be moved to
  379.   different locations other than the top (e.g., the toolbar can be placed on
  380.   the left, right, top, or bottom).  The positioning of the menubar and
  381.   toolbar isn't saved right now; I think that's for GNOME session management
  382.   which isn't supported (yet).
  383. - That means the menubar and toolbar handles are back!  Yeah!  And the
  384.   resizing grid still works too.
  385.  
  386. Gnome is automatically compiled with if it was found by configure.
  387.  
  388. ==============================================================================
  389. 7. Compiling                        *gui-x11-compiling*
  390.  
  391. If using X11, Vim's Makefile will by default first try to find the necessary
  392. GTK+ files on your system.  If the GTK+ files cannot be found, then the Motif
  393. files will be searched for.  Finally, if this fails, the Athena files will be
  394. searched for.  If all three fail, the GUI will be disabled.
  395.  
  396. For GTK+, Vim's configuration process requires that GTK+ be properly
  397. installed.  That is, the shell script 'gtk-config' must be in your PATH, and
  398. you can already successful compile, build, and execute a GTK+ program.  The
  399. reason for this is because the compiler flags (CFLAGS) and link flags
  400. (LDFLAGS) are obtained through the 'gtk-config' shell script.
  401.  
  402. Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
  403. files in a directory where configure doesn't look, edit the Makefile to enter
  404. the names of the directories.  Search for "GUI_INC_LOC" for an example to set
  405. the Motif directories, "CONF_OPT_X" for Athena.
  406.  
  407.                             *gui-x11-gtk*
  408. At the time of this writing, you may use either GTK+ version 1.0.6 or 1.2.  It
  409. is suggested that you use v1.2 since not all of Vim's GUI features are present
  410. if using v1.0.6.  For instance, there are no tearoff menus present in v1.0.6.
  411. Using a version from GTK+'s CVS tree may or may not work, and is therefore not
  412. supported and not recommended.
  413.  
  414. Lastly, although GTK+ has supposedly been ported to the Win32 platform, this
  415. has not been tested with Vim and is also unsupported.
  416.  
  417.                             *gui-x11-motif*
  418. For Motif, you need at least Motif version 1.2 and/or X11R5.  Motif 2.0 and
  419. X11R6 are OK.  Motif 1.1 and X11R4 might work, no guarantee (there may be a
  420. few problems, but you might make it compile and run with a bit of work, please
  421. send me the patches if you do).  The newest releases of LessTif have been
  422. reported to work fine too.
  423.  
  424.                             *gui-x11-athena*
  425. The Athena version uses the Xaw widget set by default.  If you have the 3D
  426. version, you might want to link with Xaw3d instead.  This will make the
  427. menus look a bit better.  Edit the Makefile and look for "XAW_LIB".  The
  428. scrollbars will remain the same, because Vim has its own, which are already
  429. 3D (in fact, they look more like Motif).
  430.  
  431.                             *gui-x11-misc*
  432. In general, do not try to mix files from different GTK+, Motif, Athena and X11
  433. versions.  This will cause problems.  For example, using header files for
  434. X11R5 with a library for X11R6 probably doesn't work (although the linking
  435. won't give an error message, Vim will crash later).
  436.  
  437. ==============================================================================
  438. 8. X11 selection mechanism                *x11-selection*
  439.  
  440. If using X11, in either the GUI or an xterm with an X11-aware Vim, then Vim
  441. provides varied access to the X11 selection and clipboard.  These are accessed
  442. by using the two selection registers "* and "+.
  443.  
  444. X11 provides two basic types of global store, selections and cut-buffers,
  445. which differ in one important aspect: selections are "owned" by an
  446. application, and disappear when that application (e.g., Vim) exits, thus
  447. losing the data, whereas cut-buffers, are stored within the X-server itself
  448. and remain until written over or the X-server exits (e.g., upon logging out).
  449.  
  450. The contents of selections are held by the originating application (e.g., upon
  451. a copy), and only passed on to another application when that other application
  452. asks for them (e.g., upon a paste).
  453.  
  454. The contents of cut-buffers are immediately written to, and are then
  455. accessible directly from the X-server, without contacting the originating
  456. application.
  457.  
  458.                             *quoteplus* *quote+*
  459. There are three documented X selections: PRIMARY (which is expected to
  460. represent the current visual selection - as in Vim's Visual mode), SECONDARY
  461. (which is ill-defined) and CLIPBOARD (which is expected to be used for
  462. cut, copy and paste operations).
  463.  
  464. Of these three, Vim uses PRIMARY when reading and writing the "* register
  465. (hence when the X11 selections are available, Vim sets a default value for
  466. |'clipboard'| of "autoselect"), and CLIPBOARD when reading and writing the "+
  467. register.  Vim does not access the SECONDARY selection.
  468.  
  469. Examples: (assuming the default option values)
  470. - Select an URL in Visual mode in Vim.  Go to a text field in Netscape and
  471.   click the middle mouse button.  The selected text will be inserted
  472.   (hopefully!).
  473. - Select some text in Netscape by dragging with the mouse.  Go to Vim and
  474.   press the middle mouse button: The selected text is inserted.
  475. - Select some text in Vim and do "+y.  Go to Netscape, select some text in a
  476.   textfield by dragging with the mouse.  Now use the right mouse button and
  477.   select "Paste" from the popup menu.  The selected text is overwritten by the
  478.   text from Vim.
  479. Note that the text in the "+ register remains available when making a Visual
  480. selection, which makes other text available in the "* register.  That allows
  481. overwriting selected text.
  482.                             *x11-cut-buffer*
  483. There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7.  Vim only
  484. uses CUT_BUFFER0, which is the one that xterm uses by default.
  485.  
  486. Whenever Vim is about to become unavailable (either via exiting or becoming
  487. suspended), and thus unable to respond to another application's selection
  488. request, it writes the contents of any owned selection to CUT_BUFFER0.  If the
  489. "+ CLIPBOARD selection is owned by Vim, then this is written in preference,
  490. otherwise if the "* PRIMARY selection is owned by Vim, then that is written.
  491.  
  492. Similarly, when Vim tries to paste from "* or "+ (either explicitly, or, in
  493. the case of the "* register, when the middle mouse button is clicked), if the
  494. requested X selection is empty or unavailable, Vim reverts to reading the
  495. current value of the CUT_BUFFER0.
  496.  
  497. Note that when text is copied to CUT_BUFFER0 in this way, the type of
  498. selection (character, line or block) is always lost, even if it is a Vim which
  499. later pastes it.
  500.  
  501. Xterm, by default, always writes visible selections to both PRIMARY and
  502. CUT_BUFFER0.  When it pastes, it uses PRIMARY if this is available, or else
  503. falls back upon CUT_BUFFER0.  For this reason, when cutting and pasting
  504. between Vim and an xterm, you should use the "* register.  Xterm doesn't use
  505. CLIPBOARD, thus the "+ doesn't work with xterm.
  506.  
  507. Most newer applications will provide their current selection via PRIMARY ("*)
  508. and use CLIPBOARD ("+) for cut/copy/paste operations.  You thus have access to
  509. both by choosing to use either of the "* or "+ registers.
  510.  
  511.  
  512.  vim:tw=78:sw=4:ts=8:ft=help:norl:
  513.